#@adminLayout() #define main()
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="data-form">
					<div class="select-list">
						<ul>
							<li>
								部门：
								<select name="cdept" style="width:100px;" id="cdept">
                     		 		<option value="all">全部</option>
			               		  	#for(data: getCdept('all'))
			               		 		<option value="#(data.ccode)">#(data.cname)</option>
			               		 	#end
                     		 </select>
							</li>
							<li>
								姓名：<input type="text" name="cname"/>
							</li>
							
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		var prefix = "#(ctx)/select_user";
		$(function() {
			var options = {
				url: prefix + "/list",
	            uniqueId: "ccode",
				sortName: "cname",
		        sortOrder: "desc",
				modalName: "人员",
				columns: [{
						checkbox: true
					},
					{
						field: 'cname',
						title: '通知标题'
					}
					]
				};
			$.table.init(options);
		});

		function selectUser()
		{
			var ucode=$.table.selectColumns('ccode');
			var ucname=$.table.selectColumns('cname');
			if(ucode.length>0)
			{
				window.parent.setUser(ucode,ucname);
				var index = parent.layer.getFrameIndex(window.name); //获取窗口索引

				parent.layer.close(index);
			}
			else
			{
	    		$.modal.alertError('请选择！');
			}
		}
		

	    function submitHandler() 
	    {
	    	selectUser();
	    }
	    
	</script>
</body>
#end